package naga.x.common;

import com.alibaba.fastjson.annotation.JSONField;

import naga.x.net.impl.pomelo.config.Dictionary;
import naga.x.net.impl.pomelo.config.Protobuf;

public class Config {
	
//	public static final String SERVER_ID = "serverId";
	public int serverId;
//	public static final String PROXY_PORT = "proxy.port"; // 代理服连接端口
	@JSONField(name = "proxy.port")
	public int proxyPort;
//	public static final String WEBSOCKET_REMOTE_ADDR = "websocket.remoteAddr";
	@JSONField(name = "websocket.remoteAddr")
	public String remoteAddr;
//	public static final String WEBSOCKET_PORT = "websocket.port"; // 直连websocket端口
	@JSONField(name = "websocket.port")
	public int port;
//	public static final String POMELO_HEARTBEAT = "pomelo.heartbeat";
	@JSONField(name = "pomelo.heartbeat")
	public int heartbeat;
//	public static final String POMELO_IS_USE_DICT = "pomelo.useDict";
	@JSONField(name = "pomelo.useDict")
	public boolean useDict;
//	public static final String POMELO_DICT = "pomelo.dict";
	@JSONField(name = "pomelo.dict")
	public String dict;
	public Dictionary dictionary;
//	public static final String POMELO_IS_USE_PROTOBUF = "pomelo.useProtobuf";
	@JSONField(name = "pomelo.useProtobuf")
	public boolean useProtobuf;
//	public static final String POMELO_PROTOBUF = "pomelo.protobuf";
	@JSONField(name = "pomelo.protobuf")
	public Protobuf protobuf;
//	public static final String HTTP_PORT = "http.port"; // http端口，用于充值回调 or GM
	@JSONField(name = "http.port")
	public int httpPort;
//	public static final String DATA_DIR = "dataDir";
	@JSONField(name = "dataDir")
	public String dataDir;
//	public static final String BAD_WORDS_FILE = "badwordsFile";
	@JSONField(name = "badwordsFile")
	public String badwordsFile;
//	public static final String SECRET_KEY = "key";
	@JSONField(name = "key")
	public String secretKey;
//	public static final String STATE = "state"; // 服务器默认状态
	public int state;
//	public static final String PLATFORM_URL = "platformUrl"; // 平台服url
	public String platformUrl;
	// 最大连接数
	public int maxConnections;
	
	@JSONField(name = "ssl.enable")
	public boolean sslEnable;
	@JSONField(name = "ssl.file")
	public String sslKeyStorePath;
	@JSONField(name = "ssl.password")
	public String sslKeyPassword;
	
	public Dictionary getDictionary() {
		return dictionary;
	}
	
//	public Protobuf getProtobuf() {
//		return getObject(POMELO_PROTOBUF, Protobuf.class);
//	}
	
}
